/* 珍贵回忆页面样式 */

/* 顶部导航 */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.nav-btn {
    background: linear-gradient(45deg, #ff6b9d, #4ecdc4);
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.page-title {
    font-family: 'Fredoka One', cursive;
    font-size: 24px;
    color: white;
    margin: 0;
}

/* 主容器 */
.memories-container {
    min-height: 100vh;
    padding: 100px 20px 120px;
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

/* 电影院背景 */
.cinema-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.screen-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 60%;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: screenGlow 4s ease-in-out infinite;
}

@keyframes screenGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.popcorn-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

.popcorn {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #fff8dc;
    border-radius: 50%;
    animation: popcornFall 8s linear infinite;
}

.popcorn:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.popcorn:nth-child(2) {
    left: 30%;
    animation-delay: 2s;
}

.popcorn:nth-child(3) {
    left: 50%;
    animation-delay: 4s;
}

.popcorn:nth-child(4) {
    left: 70%;
    animation-delay: 6s;
}

.popcorn:nth-child(5) {
    left: 90%;
    animation-delay: 1s;
}

@keyframes popcornFall {
    0% {
        top: -10px;
        opacity: 0;
        transform: rotate(0deg);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        top: 100vh;
        opacity: 0;
        transform: rotate(360deg);
    }
}

/* 页面标题 */
.memories-header {
    text-align: center;
    margin-bottom: 60px;
    animation: slideInDown 1s ease-out;
}

.memories-title {
    font-family: 'Fredoka One', cursive;
    font-size: 3em;
    color: white;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 107, 157, 0.8);
    animation: glow 2s infinite;
}

.memories-subtitle {
    font-size: 20px;
    color: #ccc;
    font-weight: 600;
}

/* 电影票区域 */
.tickets-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.ticket {
    background: linear-gradient(135deg, #ff6b9d, #4ecdc4);
    border-radius: 15px;
    width: 300px;
    height: 180px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    opacity: 0.7;
    transform: scale(0.95);
}

.ticket.active {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 15px 40px rgba(255, 107, 157, 0.4);
}

.ticket:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

.ticket::before {
    content: '';
    position: absolute;
    top: 0;
    left: 80px;
    width: 2px;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 8px,
        white 8px,
        white 12px
    );
}

.ticket-stub {
    position: absolute;
    left: 0;
    top: 0;
    width: 80px;
    height: 100%;
    background: rgba(255,255,255,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.ticket-number {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
}

.ticket-title {
    font-size: 12px;
    color: white;
    font-weight: 600;
    margin-bottom: 5px;
}

.ticket-subtitle {
    font-size: 10px;
    color: rgba(255,255,255,0.8);
}

.ticket-main {
    margin-left: 90px;
    padding: 20px;
    height: 100%;
    display: flex;
    align-items: center;
}

.ticket-info h3 {
    color: white;
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 700;
}

.ticket-info p {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.ticket-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ticket-details span {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
}

/* 视频播放区 */
.video-theater {
    max-width: 900px;
    margin: 0 auto 60px;
    position: relative;
}

.theater-screen {
    position: relative;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    aspect-ratio: 16/9;
}

.spotlight {
    position: absolute;
    width: 100px;
    height: 200px;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    z-index: 10;
    animation: spotlightSweep 6s ease-in-out infinite;
}

.spotlight-left {
    left: -50px;
    top: -50px;
    transform: rotate(-30deg);
    animation-delay: 0s;
}

.spotlight-right {
    right: -50px;
    top: -50px;
    transform: rotate(30deg);
    animation-delay: 3s;
}

@keyframes spotlightSweep {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

#main-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-button {
    width: 80px;
    height: 80px;
    background: rgba(255, 107, 157, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.play-button:hover {
    transform: scale(1.1);
    background: rgba(255, 107, 157, 1);
}

.play-icon {
    color: white;
    font-size: 24px;
    margin-left: 5px;
}

/* 视频控制栏 */
.video-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.control-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 10px;
    padding: 10px 15px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(255, 107, 157, 0.8);
    transform: translateY(-2px);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

#volume-slider {
    width: 100px;
    height: 5px;
    background: rgba(255,255,255,0.3);
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

#volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 15px;
    height: 15px;
    background: #ff6b9d;
    border-radius: 50%;
    cursor: pointer;
}

/* 照片画廊 */
.photo-gallery {
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-title {
    text-align: center;
    font-family: 'Fredoka One', cursive;
    font-size: 2em;
    color: white;
    margin-bottom: 40px;
    text-shadow: 0 0 20px rgba(78, 205, 196, 0.8);
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.photo-item:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:hover img {
    transform: scale(1.1);
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.photo-item:hover .photo-overlay {
    transform: translateY(0);
}

.photo-caption {
    font-weight: 600;
    font-size: 14px;
}

/* 图片查看器 */
.photo-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
}

.viewer-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.viewer-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.viewer-close:hover {
    background: rgba(255, 107, 157, 0.8);
}

#viewer-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.viewer-caption {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin-top: 20px;
    text-align: center;
}

.viewer-controls {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.viewer-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.viewer-btn:hover {
    background: rgba(255, 107, 157, 0.8);
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px;
    display: flex;
    justify-content: space-around;
    z-index: 100;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.3);
}

.nav-button {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 15px;
    color: white;
}

.nav-button:hover {
    background: rgba(255, 107, 157, 0.2);
    transform: translateY(-3px);
}

.nav-icon {
    font-size: 24px;
}

.nav-label {
    font-size: 12px;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .memories-container {
        padding: 80px 15px 100px;
    }
    
    .memories-title {
        font-size: 2em;
    }
    
    .tickets-container {
        gap: 20px;
    }
    
    .ticket {
        width: 280px;
        height: 160px;
    }
    
    .ticket-main {
        margin-left: 80px;
        padding: 15px;
    }
    
    .ticket-info h3 {
        font-size: 16px;
    }
    
    .ticket-info p {
        font-size: 12px;
    }
    
    .video-controls {
        gap: 15px;
        padding: 15px;
    }
    
    .control-btn {
        padding: 8px 12px;
        font-size: 16px;
    }
    
    .photos-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .gallery-title {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    .ticket {
        width: 100%;
        max-width: 300px;
        height: 140px;
    }
    
    .ticket-stub {
        width: 60px;
    }
    
    .ticket-main {
        margin-left: 70px;
        padding: 10px;
    }
    
    .ticket-number {
        font-size: 18px;
    }
    
    .ticket-info h3 {
        font-size: 14px;
    }
    
    .ticket-info p {
        font-size: 11px;
    }
    
    .video-controls {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .volume-control {
        order: 1;
        width: 100%;
        justify-content: center;
    }
    
    .photos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .nav-btn {
        padding: 8px 15px;
        font-size: 12px;
    }
}

/* 特殊动画 */
.ticket.selected {
    animation: ticketSelect 0.5s ease-out;
}

@keyframes ticketSelect {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1.05); }
}

.video-theater.playing .spotlight {
    animation-duration: 3s;
}

/* 加载动画 */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
}

.video-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



